package service

import (
	"github.com/crack007/go-im/src/common/constant"
	"github.com/crack007/go-im/src/common/model"
)

type messageService struct {
}

func (s *messageService) Send(messageModel *model.MessageModel) {
	if messageModel.Action == constant.ACTION_BROADCAST {
		BroadcastService.All(model.NewBroadcastModel(messageModel.Action, messageModel.Data))
		return
	}
	UserManagerService.Send(messageModel)
}
